from dataaccess import ReviewData
from common import utility

class ReviewBiz(object):
    def __init__(self):
        pass

    def __ValidateInsert(self, review):
        valid = True
        if not valid:
            raise utility.BusinessException(message="",fieldName = "")
        
    def __ValidateUpdate(self, review):
        valid = True
        if not valid:
            raise utility.BusinessException(message="",fieldName = "")
        
    def __ValidateDelete(self, reviewer, albumID):
        valid = True
        if not valid:
            raise utility.BusinessException(message="",fieldName = "")
        
    def InsertReview(self, review):
        self.__ValidateInsert(review)
        reviewData = ReviewData.ReviewData()
        reviewData.InsertReview(review)

    def UpdateReview(self, review):
        self.__ValidateUpdate(review)
        reviewData = ReviewData.ReviewData()
        reviewData.UpdateReview(review)

    def DeleteReview(self, reviewer, albumID):
        self.__ValidateDelete(reviewer, albumID)
        reviewData = ReviewData.ReviewData()
        reviewData.DeleteReview(reviewer, albumID)
